package org.jeecg.modules.zcgl.mapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.zcgl.entity.ReceivablesInfo;
import org.jeecg.modules.zcgl.vo.CollectionInformationVo;
import org.jeecg.modules.zcgl.vo.statistical.BillReceivablesDetailsVo;
import org.jeecg.modules.zcgl.vo.statistical.IncomeOperatingStatisticalVo;
import org.jeecg.modules.zcgl.vo.statistical.PaymentRecordsVo;

import java.util.List;
import java.util.Map;

/**
 * @Description: 应收款项信息
 * @Author: jeecg-boot
 * @Date:   2020-06-23
 * @Version: V1.0
 */
public interface ReceivablesInfoMapper extends BaseMapper<ReceivablesInfo> {

    IPage<ReceivablesInfo> pageByWechat(Page<ReceivablesInfo> page, @Param("ew") QueryWrapper<ReceivablesInfo> queryWrapper,  @Param("param") Map<String, Object> param);


    List<String> queryIdList(@Param("ew") Wrapper<ReceivablesInfo> queryWrapper, @Param("param") Map<String, Object> param);

    IPage<CollectionInformationVo> queryCollectionInformationVoList(Page<CollectionInformationVo> page, @Param("ew") QueryWrapper<CollectionInformationVo> queryWrapper);

    List<CollectionInformationVo> queryCollectionInformationVoList(@Param("ew") QueryWrapper<CollectionInformationVo> queryWrapper);


    /**
     * 缴费记录统计查询
     * @param page
     * @param queryWrapper
     * @return
     */
    IPage<PaymentRecordsVo> queryPaymentRecordsList(Page<PaymentRecordsVo> page,@Param("ew") QueryWrapper<PaymentRecordsVo> queryWrapper);

    /**
     * 缴费记录统计查询(用作导出)
     * @param queryWrapper
     * @return
     */
    List<PaymentRecordsVo> queryPaymentRecordsList(@Param("ew") QueryWrapper<PaymentRecordsVo> queryWrapper);

    /**
     * 账单已收未收明细
     * @param page
     * @param queryWrapper
     * @return
     */
    IPage<BillReceivablesDetailsVo> queryBillReceivablesDetailsPageList(Page<BillReceivablesDetailsVo> page,@Param("ew") QueryWrapper<BillReceivablesDetailsVo> queryWrapper);

    List<BillReceivablesDetailsVo> queryBillReceivablesDetailsPageList(@Param("ew") QueryWrapper<BillReceivablesDetailsVo> queryWrapper);

    /**
     * 经营收入汇总
     * @param page
     * @param queryWrapper
     * @return
     */
    @SqlParser(filter = true)
    IPage<IncomeOperatingStatisticalVo> queryIncomeOperatingStatisticalPageList(Page<IncomeOperatingStatisticalVo> page,@Param("ew")  QueryWrapper<IncomeOperatingStatisticalVo> queryWrapper);
}
